Convert int to string?

I am running into a situation where DXL does not seem to like. I want to send to a file a string followed by an integer, but DXL complains. If I send all strings, no problem.

Is there a way to convert an int into a string to avoid this situation?

code
stream g_stExcelOutput
string strDelim = "^"
int g_nEquipList50
int nLoop

g_stExcelOutput << strDelim g_nEquipListnLoop // This is line 67
code

Here is the output:
-E- DXL: <Line:67> incorrectly concatenated tokens
-I- DXL: all done with 1 error and 0 warnings
Gedinfo - Fri Feb 10 09:19:19 EST 2012

Re: Convert int to string?
Gedinfo - Fri Feb 10 11:52:31 EST 2012

I found that this can happen by this:

string strTemp = nLoop ""

Re: Convert int to string?
llandale - Fri Feb 10 20:34:59 EST 2012

You may not concatenate a string with an integer:
  • "s" 1
is illegal. But you can concatenate an integer with a string:
  • 1 "" <-- looks like "1"
  • "s" 1 "" <-- looks like "s1"
The last thing concatenated must be a string. So you probably need to do this:
  • g_stExcelOutput << strDelim g_nEqupList[nLoop] "" // empty double-quotes at the end
or this:
  • g_stExcelOutput << strDelim
  • g_stExcelOutput << g_nEqupList[nLoop] // You MAY send an integer to a file

-Louie

I forget to "preview" all the time.

BTW, that last line was typed like this:

- g_stExcelOutput << g_nEqupList\[nLoop] 
// You MAY send an integer to a file

and that last pretty block was types like this:
{code}
- g_stExcelOutput << g_nEqupList\[nLoop] // You MAY send an integer to a file
{code}